package org.apache.struts2.osgi.util;

import org.apache.struts2.osgi.OsgiHost;
import org.osgi.framework.Bundle;

public class Struts2Bundle {
	 /**
     * Checks for "Struts2-Enabled" header in the bundle
     */
    public static Boolean shouldProcessBundle(Bundle bundle) {
        String strutsEnabled = (String) bundle.getHeaders().get(OsgiHost.OSGI_HEADER_STRUTS_ENABLED);

        return "true".equalsIgnoreCase(strutsEnabled);
    }
}
